﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MaymuseMS.Models.ValueObject;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MaymuseMS.Models {
    public class OrderItem {
        public int OrderItemId { get; set; }

        public virtual ProductValueObject ProductValueObject { get; set; }

        public double Count { get; set; }
        public decimal Price { get; set; }

        public decimal Total {
            get {
                return (decimal)Count * Price;
            }
        }
        public int OrderId { get; set; }
        public virtual Order Order { get; set; }

        public double InDepositoryCount { get; set; }
    }
}